Skip to content

Conversation

@crazyoyo
Copy link

Hello:

According to Redis official statement about keyspace notifications, "Every node of a Redis cluster generates events about its own subset of the keyspace as described above. However, unlike regular Pub/Sub communication in a cluster, events' notifications are not broadcasted to all nodes." But Redis drivers, such as Jedis, randomly obtains a connection from a node of the redis cluster to subscribe events, including keyspace notifications. Which means that many events are missed from the Redis cluster.

Summary:
This PR improves the eventuallyPerformSubscription() method in RedisMessageListenerContainer by first determine whether it is a keyspace notifications pattern, then traverse all master nodes, and create event subscriber one by one to ensure that no keyspace notifications events are missed.

Proposed solution:
This PR improves the eventuallyPerformSubscription() method in RedisMessageListenerContainer by subscribe all master nodes to make sure no keyspace notifications events are missed.

@pivotal-cla
Copy link

@crazyoyo Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@crazyoyo Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 10, 2024
@mp911de
Copy link
Member

mp911de commented Oct 10, 2024

Thanks for looking into this. We're not going to merge this PR as the changes pull in a lot of driver dependencies into the listening container. We do not want such a design, instead, a design where we could benefit from abstractions would be much better to align with how we design our components.

@mp911de mp911de closed this Oct 10, 2024
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants